Write-Host "Preparing nsis-resources for offline build..." -ForegroundColor Green

# Create project cache directory
$projectCacheDir = "cache"
$nsisResourcesDir = "$projectCacheDir\nsis-resources"

if (!(Test-Path $projectCacheDir)) {
    New-Item -ItemType Directory -Path $projectCacheDir
}
if (!(Test-Path $nsisResourcesDir)) {
    New-Item -ItemType Directory -Path $nsisResourcesDir
}

Write-Host "Please extract nsis-resources-3.4.1.7z to this location:" -ForegroundColor Yellow
Write-Host "$nsisResourcesDir\" -ForegroundColor Cyan
Write-Host ""
Write-Host "After extraction, the structure should be:" -ForegroundColor Yellow
Write-Host "cache\nsis-resources\" -ForegroundColor White
Write-Host "  - nsis-resources-3.4.1\" -ForegroundColor White
Write-Host "    - (nsis resource files...)" -ForegroundColor White
Write-Host ""
Write-Host "Download URL: https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.4.1/nsis-resources-3.4.1.7z" -ForegroundColor Gray
Write-Host ""
Read-Host "Press any key to continue..." 